package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;
import com.sun.org.apache.bcel.internal.util.ClassPath;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

@Component("userService")
@PropertySource("classpath:jdbc.properties")
public class UserServiceImpl implements UserService {
    @Value("陈彪")
    private String name;
    @Value("60")
    private int age;
    @Value("${shuxing}")
    private String shuxing;

    @Autowired
    private UserDao userDao;


    public void save() {
        System.out.println("service..." + "姓名:" + name + "，年龄:" + age + "特点:" + shuxing);
        userDao.save();
    }
}
